﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ComeSeeThis_MVC2.Models
{
    [MetadataType(typeof(CompanyAddressesValidation))]
    public class CompanyAddresses
    {
    }
    public class CompanyAddressesValidation
    {
        [Required(ErrorMessage = "Company ID is required")]
        public int CompanyId { get; set; }

        [StringLength(100, ErrorMessage = "Company address line one may not be longer than 100 characters")]
        public string CompanyAddress1{ get; set; }

        [StringLength(100, ErrorMessage = "Company address line two may not be longer than 100 characters")]
        public string CompanyAddress2 { get; set; }

    }

}